.el-dialog {
  overflow: auto;

  .el-dialog__body {
    padding: 10px 20px 20px 20px;
  }

  &.el-dialog__header-no-padding {
    .el-dialog__header {
      padding: 0;
    }
  }

  &.el-dialog__body-no-padding {
    .el-dialog__body {
      padding: 0;
    }
  }
}

.el-input {
  &.is-disabled {
    .el-input__wrapper {
      background-color: transparent;
      box-shadow: 0 0 0 1px var(--dbtu-border-disabled-color) inset;
    }

    .el-input__inner {
      color: var(--dbtu-font-color-disabled);
      -webkit-text-fill-color: var(--dbtu-font-color-disabled);
    }
  }

  .el-input-group__append,
  .el-input-group__prepend {
    background-color: var(--dbtu-background-color);
  }
  .el-input-group__append {
    border-left: 1px solid var(--dbtu-divide-borer-color);
  }
}

.el-input-number__text-left {
  &.is-without-controls .el-input__wrapper {
    padding-left: 11px !important;
    padding-right: 11px !important;
  }

  .el-input__inner {
    text-align: left !important;
  }
}

.el-textarea {
  &.is-disabled .el-textarea__inner {
    background-color: transparent;
    box-shadow: 0 0 0 1px var(--dbtu-border-disabled-color) inset;
  }
}

.el-select-dropdown {
  .el-select-dropdown__item {
    padding: 0 20px 0 15px;

    &.hover,
    &:hover {
      background-color: var(--dbtu-hover-color);
    }
  }
}

.el-table {
  color: var(--dbtu-font-color);

  --el-table-header-bg-color: var(--dbtu-background-color);
  --el-table-bg-color: var(--dbtu-background-color);
  --el-table-tr-bg-color: var(--dbtu-background-color);

  &.el-table--enable-row-hover .el-table__body tr:hover > td.el-table__cell,
  &--enable-row-hover .el-table__body tr:hover > td.el-table__cell {
    background-color: var(--dbtu-hover-color);
  }

  &:not(.el-table--border) .el-table--border::after,
  &:not(.el-table--border) .el-table--border::before,
  &:not(.el-table--border) .el-table--border .el-table__inner-wrapper::after,
  &:not(.el-table--border) .el-table__inner-wrapper::before {
    background-color: transparent;
  }

  thead {
    color: var(--dbtu-font-color);
  }

  &:not(.el-table--border) td.el-table__cell,
  &:not(.el-table--border) th.el-table__cell.is-leaf {
    border-bottom: none;
  }

  .el-table__body tr.current-row > td.el-table__cell {
    background-color: var(--dbtu-hover-color);
  }
}

.el-table-v2 {
  .el-table-v2__header-cell-text,
  .el-table-v2__cell-text {
    color: var(--dbtu-font-color);
  }

  .el-table-v2__cell-text {
    cursor: default;
  }

  &.table-border {
    .el-table-v2__header-row,
    .el-table-v2__row {
      border-bottom: none;
    }

    .el-table-v2__row:hover {
      background-color: transparent;

      .el-table-v2__row-cell {
        background-color: var(--dbtu-hover-color);
      }
    }

    .el-table-v2__header-cell,
    .el-table-v2__row-cell {
      border-bottom: 1px solid var(--dbtu-divide-borer-color);
      border-right: 1px solid var(--dbtu-divide-borer-color);
    }

    .el-table-v2__row .el-table-v2__row-cell:first-child {
      border-left: 1px solid var(--dbtu-divide-borer-color);
    }

    .el-table-v2__header-cell {
      border-top: 1px solid var(--dbtu-divide-borer-color);

      &:first-child {
        border-left: 1px solid var(--dbtu-divide-borer-color);
      }
    }
  }
}

.el-message-box {
  background-color: var(--dbtu-background-color);
  border-radius: var(--dbtu-border-radius);
}

.el-button {
  &.is-link {
    &:not(.is-disabled):hover,
    &:not(.is-disabled):focus {
      color: var(--dbtu-theme-color);
    }

    &.is-loading {
      color: var(--dbtu-font-color-disabled);

      &:before {
        background-color: transparent;
      }
    }
  }
}

.el-tabs {
  --el-tabs-header-height: 34px;

  .el-tabs__nav-wrap::after {
    height: 1px;
    background-color: var(--el-tabs-nav-bg-color, var(--dbtu-divide-borer-color, #fff));
  }

  .el-tabs__item {
    width: var(--el-tab-pane-width, auto);
    user-select: none;
  }
}

.el-select-v2__wrapper.is-disabled {
  background-color: transparent;
  box-shadow: 0 0 0 1px var(--dbtu-border-disabled-color) inset;
  color: var(--dbtu-font-color-disabled);
  border-color: transparent;
}

.el-select-v2 .is-disabled .el-select-v2__placeholder {
  color: var(--dbtu-font-color-disabled);
}

/* el-select-v2 item style */
.el-select-dropdown__option-item {
  &.is-selected:not(.is-multiple) {
    color: var(--dbtu-theme-color);
    background-color: var(--dbtu-hover-color);
  }

  &.hover {
    background-color: var(--dbtu-hover-color) !important;
  }
}

.el-slider__runway {
  background-color: var(--dbtu-hover-color) !important;
}

.el-tree {
  &.el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content {
    background-color: var(--dbtu-hover-color);
    color: var(--dbtu-theme-color);
  }

  .el-tree-node {
    &:focus > .el-tree-node__content {
      background-color: var(--dbtu-hover-color);
    }

    .el-tree-node__content:hover {
      background-color: var(--dbtu-hover-color);
    }
  }
}

.el-form.hide-required-label .el-form-item__label:before {
  content: '' !important;
  margin-right: 0 !important;
}

.el-drawer {
  .el-drawer__header {
    margin-bottom: 10px;
  }
}

.el-checkbox {
  .el-checkbox__inner {
    border-color: var(--dbtu-font-color-disabled);
  }
}
